I tried linking EC2 instances with ALB

I tried linking EC2 instances with ALB

Clock Icon2023.02.01

この記事は公開されてから1年以上経過しています。情報が古い可能性がありますので、ご注意ください。

Introduction

Hemanth of Alliance Department here. In this blog, i tried linking EC2 instances by creating an ALB.

EC2

It is a service offered by Amazon Web Services for cloud computing (AWS). By offering scalable cloud computing power through EC2, users can rent virtual computers on which to execute their own apps. When managing and scaling applications in the cloud, EC2 offers a flexible, affordable, and simple solution.

ALB

ALB stands for Amazon Load Balancer, a load-balancing service offered by Amazon Web Services (AWS). Incoming application traffic is automatically split out over numerous targets, including EC2 instances, containers, and IP addresses in one or more Availability Zones. ALB boosts the capacity of your application to manage incoming traffic while also assisting in ensuring high availability and fault tolerance for your applications.

Demo

Go to Console search for EC2 and click launch instance Give the name to EC2 server Now creating the KeyPair Click on edit in Network section and edit name of security group Adding security group rule In advanced details type down the following code in the User Data section, which creates a server and HTML page
Keep others settings default and click launch Again launching a new Intance Give the name Choose the above created keypair Choose the websecurity group created in the network section In advanced details type down the following code in the User Data section, which creates a server and HTML page
Keep others settings default and click launch Now in the load balancing click on target group Next click on create target group Give a target name As we have created index.html typing it down and make changes in threshold and interval click next and click on create target group Now creating a load balancer Choosing the application load balancer Give the name and select all the mappings Selecting the security group created and your target group Keeping other settings as default and click create load balancer Click on ALB created copy the DNS name when you access the link the following response is displayed

Conclusion

Hope with this you get an idea of how to link EC2 instances with ALB. Thank you for seeing the blog till the end.

Share this article

facebook logohatena logotwitter logo

© Classmethod, Inc. All rights reserved.